<template>
	<div>
		通过计算的x,y坐标绘制svg图片
	</div>
</template>

<script setup>
	import {computed} from 'vue'
	import {valueToPoint} from './util.js'
	const props = defineProps({
		data: Array
	})

	const points = computed(() => {
	  const total = props.data.length
	  return props.data
	    .map((stat, i) => {
	      const { x, y } = valueToPoint(stat.value, i, total)
	      console.log(x, y)
	      return `${x},${y}`
	    })
	    .join(' ')
	})
	console.log(points)
</script>

<style>
</style>